//
//  Condition+Condition.m
//  ClinicalCollections
//
//  Created by janakiraman gopinath on 2/10/13.
//  Copyright (c) 2013 GOPI. All rights reserved.
//

#import "Condition+Condition.h"

@implementation Condition (Condition)

+ (void) conditions:(NSArray *) conditions
               forContext:(NSManagedObjectContext *)context
      forClinicalTrialGov:(ClinicalTrialGov *)clinicalTrialGov
{
    for (NSString *conditionString in conditions) {
        Condition  *condition = (Condition *)[NSEntityDescription insertNewObjectForEntityForName:@"Condition"
                                                                           inManagedObjectContext:context];
        condition.condition = conditionString;
        condition.nctId = clinicalTrialGov.nctID;
        condition.clinicalTrialGov = clinicalTrialGov;
    }
    return;
}
@end
